<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script language="javascript">
	function inverte(){
		var url_val = $("#url").val();
		$.get('inverte.php', "url="+url_val, function(data){
			$('#resultado').html(data);
		});
	}
</script>
<div id="formulario">
	<label for="url">URL: </label><input id="url" type="text" name="url" />
	<a href="#" onclick="inverte(); return false;">Inverte</a>
</div>
<div id="resultado">
</div>
